from pandas import DataFrame


def run(source: DataFrame, param_dict: dict) -> DataFrame:
    querys = param_dict["querys"]
    query_str = ""
    for query in querys:
        column = query["column"]
        condition = query["condition"]
        value = query["value"]
        logic = query["logic"]
        query_str = query_str + " `{column}` {condition} {value} {logic}".format(
            column=column, condition=condition, value=value, logic=logic)
    query_str = query_str.removesuffix("and").removesuffix("or")
    print("query_str = "+query_str)
    source.query(query_str,inplace=True)
    return source

